package com.niu.wm.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import com.niu.wm.model.Product;
import com.niu.wm.model.User;
import com.niu.wm.form.ProductSearchForm;
import com.niu.wm.vo.ProductVO;

public interface ProductService {
	
	Product load(Long id);
	
	int insert(User user, Product product);
        
    int update(User user, Product product);
    
    int countProduct(ProductSearchForm form);
    
    int delete(User user, Long id);

	List<ProductVO> queryProduct(ProductSearchForm form, Pageable pageable);
	
	int importProduct(User user, String webRootPath, MultipartFile file) throws IOException,Exception;
	
	Workbook exportProducts(ProductSearchForm form) throws IOException;
	 
	String getUploadedImagePath(String webRootPath);
}
